<div class="row-fluid lines" style="padding-top: 20px;padding-bottom: 20px">
<div  style="padding-left: 20px;" >
	<input type="hidden" name="user" value="<?php echo ucfirst($this->common_model->get_username_id($this->session->userdata('user_id')));?>" readonly />
	<span style="font-size: 21px">All Questions</span>
	<br />
	<span style="font-size: 14px" class="muted">	
	<?php echo ucfirst($this->common_model->get_username_id($this->session->userdata('user_id')));?></span>
	<br>	
</div>
</div>
<div>
<form action="<?php echo site_url('client/questions/bulk_actions');?>" method="POST">
<div class="row-fluid">
	<table class="table">		
		<tr>
			<td width="10%">
				<select class="" name="qactions" disabled="disabled" id="qactions" >				
					<option value="1">Answered</option>
					<option value="0">Unanswered</option>
				</select>				
			</td>
			<td><input type="submit" value="Apply" class="btn"/></td>			
		</tr>
	</table>
</div>
<div>
<table class="table table-condensed">
	<thead>
	<tr>
		<th width="2%">		
		<input type="checkbox" name="all" id="all" onchange="select_all();" value="all">			
		</th>
		<th>Project Name</th>
		<th colspan="2">Question title</th>
		<th>Posted On</th>
	</tr>
	</thead>
	<?php foreach($my_questions as $my_question){ ?>
	<tr>	
	<td width="1%">
	<input type="checkbox" name="selected[]" class="alls" value="<?php echo $my_question->id?>"/>	
	</td>
	<td width="10%"><?php echo $my_question->pName; ?></td>
	<?php if($my_question->is_answered==1) {?>
		<td width="2%"><a href="<?php echo site_url('client/questions/unanswered/'.$my_question->id);?>" class="text-success"> <i class="icon-ok-sign"></i> </a> </td>
		<?php }else {?>
		<td width="2%"><a href="<?php echo site_url('client/questions/answered/'.$my_question->id);?>" class="muted"><i class="icon-ok-circle"></i></a> </td>
		<?php }?>
		<td width="70%">
		<a class="tooltips" title="<?php echo $my_question->pName;?>" href="<?php echo site_url('user/tasks/task_detail/'.$my_question->task_id)?>">
		<span style="<?php if($my_question->is_answered==1){echo 'text-decoration:line-through;';}?>" >
		<?php echo $my_question->note;?>
		</span>
			</a>			
		</td>
		<td><?php echo $my_question->date;?></td>		
	</tr>
	<?php }?>
	<tr></tr>		
	</table>	
</div>
</form>
</div>
<script type="text/javascript">
	
function select_all(){
	if(document.getElementById('all').checked){
		$('.alls').attr('checked','checked');
		$('#qactions').removeAttr('disabled');
	}else{
		$('.alls').prop('checked', false);
		$('#qactions').attr({'disabled':'disabled'});
		}
	}
	$('.alls').click(function(){
		$('#all').attr('checked','checked');
		$('#qactions').removeAttr('disabled');
	});
	
</script>

<!--<th><input type="checkbox" name="all" id="all" onchange="select_all();" value="all"></th>

<td><input type="checkbox" id="sel" name="selected[]"  class="all" value="{$mod.id}"></td>-->